﻿Namespace Cues.Converters
	Public Class CueStatusToColorConverter
		Implements IValueConverter

		Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.Convert
			Try
				Dim v As Cues.CueStatus = CType(value, Cues.CueStatus)
				If v = Cues.CueStatus.Active Then
					'Return Brushes.LightGreen
					'Return New SolidColorBrush(Color.FromRgb(140, 236, 110))
					Return My.Application.FindResource("Active")
				ElseIf v = Cues.CueStatus.Cued Then
					'Return Brushes.CornflowerBlue
					'Return New SolidColorBrush(Color.FromRgb(54, 164, 221))
					Return My.Application.FindResource("Cued")
				Else
					'Return Brushes.White
					Return My.Application.FindResource("Standby")
				End If

			Catch ex As Exception
				Return Brushes.White
			End Try
		End Function

		Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
			Throw New NotImplementedException
		End Function
	End Class
End Namespace